package cn.iocoder.yudao.module.system.controller.app.config;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.system.controller.app.config.vo.AppSystemInfoRespVO;
import cn.iocoder.yudao.module.system.service.config.AppSystemConfigService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.annotation.security.PermitAll;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

@Tag(name = "用户 App - 系统配置")
@RestController
@RequestMapping("/system/config")
@Validated
public class AppSystemConfigController {

    @Resource
    private AppSystemConfigService appSystemConfigService;

    @GetMapping("/getSystemInfo")
    @Operation(summary = "获取系统配置信息")
    @PermitAll
    public CommonResult<AppSystemInfoRespVO> getSystemInfo() {
        AppSystemInfoRespVO systemInfo = appSystemConfigService.getSystemInfo();
        return success(systemInfo);
    }

}